package com.willen.topFloatDemo;


import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;

public class MainActivity extends Activity {
	  private ListView listView;
	  private ListViewAdapter adapter;
	  private String[] beans = new String[] { "1", "2", "3", "4", "5", "6", "7",
	      "8", "9", "10", "11", "12", "13" };

	  @Override
	  protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);

	    initView();

	  }

	  private void initView() {
	    // TODO Auto-generated method stub
	    Log.i("htp", "beans.size:" + beans.length);
	    listView = (ListView) findViewById(R.id.listView1);
	    adapter = new ListViewAdapter(MainActivity.this, beans,4);
	    listView.setAdapter(adapter);
	    listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
	  }
}